import re

#数据清理

def clear_char(texts:str):
    return re.sub("\n+","\n",texts)

if __name__ == '__main__':
    texts = "你好吗\n\n\n我很好"
    print(texts)
    print("-------------")
    print(clear_char(texts))

